/**
 * File: GraphAccess.java
 * Created by: mhaimel
 * Created on: Mar 24, 2010
 * CVS:  $Id: GraphAccess.java 1.0 Mar 24, 2010 9:06:53 AM mhaimel Exp $
 */
package uk.ac.ebi.curtain.model.graph;

import org.apache.commons.lang.ObjectUtils.Null;

/**
 * @author mhaimel
 *
 */
public interface GraphAccess<E> {
	
	public interface ProcessEach<E>{
		
		/**
		 * If returns {@link Null}, than the element processed gets removed from the graph.
		 * An element could be a {@link Arc} or {@link Node}
		 * @param idx Current index id of the element in store
		 * @param element Current element used
		 * @return Modified element to be stored
		 */
		E process(int idx,E element);
		
	}
	
	public interface TouchEach<E>{
		
		/**
		 * An element could be a {@link Arc} or {@link Node}
		 * @param idx Current index id of element in store
		 * @param arc Current element used
		 */
		void touch(E element);
		
	}
	
}
